#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Import smtplib for the actual sending function
import smtplib
from email.mime.text import MIMEText
_user = "1739000600@qq.com"
_pwd  = "chnefjuxfsmefddi"
_to   = "1739000600@qq.com"

msg = MIMEText("Test")
msg["Subject"] = "don't panic"
msg["From"] = _user
msg["To"] = _to


try:
    s = smtplib.SMTP_SSL("smtp.qq.com", 465)
    s.login(_user, _pwd)
    s.sendmail(_user, _to, msg.as_string())
    s.quit()
    print "Success!"
except smtplib.SMTPException,e:
    print "Falied,%s"%e